<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('订单详情查看')"/>
</head>
<body>
<form class="layui-form" action=""  th:object="${OrderO}">
    <div class="mainBox">
        <div class="main-container">
            <div class="main-container">

                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">订单ID：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" type="text" th:value="*{id}" name="id" lay-verify="title"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">预约ID：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{reserId}" type="text" name="reserId" autocomplete="off" placeholder="预约ID" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">顾客名：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{cusName}" type="text" name="cusName" autocomplete="off" placeholder="顾客名" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">发型师：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{hName}" type="text" name="hName" autocomplete="off" placeholder="发型师" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">服务项目：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{serItem}" type="text" name="serItem" autocomplete="off" placeholder="服务项目" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">支付方式：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{pMethod}" type="text" name="pMethod" autocomplete="off" placeholder="支付方式" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">应付金额(元)：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{amPayable}" type="text" name="amPayable" autocomplete="off" placeholder="应付金额" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">实付金额(元)：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{acPaid}" type="text" name="acPaid" autocomplete="off" placeholder="实付金额" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">收银员：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{oCashier}" type="text" name="oCashier" autocomplete="off" placeholder="收银员" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">备注：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{reMark}" type="text" name="reMark" autocomplete="off" placeholder="备注" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">支付ID：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{pId}" type="text" name="pId" autocomplete="off" placeholder="支付ID" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">支付时间：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{pTime}" type="text" name="pTime" autocomplete="off" placeholder="支付时间" class="layui-input">
                    </div>
                </div>



                <div class="layui-form-item">
                    <label class="layui-form-label">订单状态：</label>
                    <div class="layui-input-block">
                        <input disabled="disabled" th:value="*{oState}" type="text" name="oState" autocomplete="off" placeholder="订单状态" class="layui-input">
                    </div>
                </div>


            </div>
        </div>
    </div>
    <!-- <div class="bottom">
        <div class="button-container">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit=""
                    lay-filter="orderO-update">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div> -->
</form>
<th:block th:include="include :: footer"/>
<script>
    layui.use(['form','laydate','jquery'], function () {
        let form = layui.form;
        let $ = layui.jquery;
        let MODULE_PATH = rootPath+"/OrderOController";

        form.on('submit(orderO-update)', function (data) {
            $.ajax({
                url: MODULE_PATH+'/edit',
                data: data.field,
                dataType: 'json',
                contentType: 'application/x-www-form-urlencoded',
                type: 'post',
                success: function (result) {
                    if (result.code==200) {
                        layer.msg(result.msg, {icon: 1, time: 1000}, function () {
                            parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
                            parent.layui.table.reload("orderO-table");
                        });
                    } else {
                        layer.msg(result.msg, {icon: 2, time: 1000});
                    }
                }
            })
            return false;
        });
    })
</script>
<script>
</script>
</body>
</html>